/*
 * Copyright (c)e 2024-2024.Powered by 清明雨揽月
 * This software is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *          http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN 'AS IS' BASIS, WITHOUT WARRANTIES OF ANY
 * KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */

#include "double_linked_list.h"

using namespace std;

bool double_linked_list::list_init()
{
    _link_list = static_cast<l_node *>(malloc(sizeof(l_node)));
    _link_list->prior = nullptr;
    _link_list->next = nullptr;
    return true;
}

bool double_linked_list::list_delete() const
{
}

bool double_linked_list::list_insert(string &data) const
{
    auto *p = static_cast<l_node *>(malloc(sizeof(l_node)));
    p->data = std::move(data);
    p->next = nullptr;
    return true;
}
